<%@ Control Language="C#" Inherits="Yuanlin.Business.ServiceTermses, Yuanlin.Business"
    AutoEventWireup="true" %>
<%@ Import Namespace="System.Web.Core" %>
<%@ Import Namespace="Yuanlin.Business" %>
<center>
    <div class="breadCrumbs" style="width:760px">
        <nwap:ServiceTermsBreadCrumb runat="server" />
    </div>
    <table width="778" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td valign="top" class="treebox">
                <div id="tree1">
                    <asp:Repeater runat="server" ID="listLeftMenuName">
                        <ItemTemplate>
                            <div id="menu">
                                <a class="linkItem" id="linkItem" href="<%# SiteUrls.Instance().GetServiceTerms(((ServiceTerms)Container.DataItem).EntityId.Value) %>"
                                    title="<%# ((ServiceTerms)Container.DataItem).EntityId.Value %>">
                                    <%# DataBinder.Eval(Container.DataItem, "LeftMenuName") %>
                                </a>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
            </td>
            <td width="10">
                &nbsp;</td>
            <td width="628" align="center" valign="top">
                <asp:Repeater runat="server" ID="list">
                    <ItemTemplate>
                        <table width="100%" class="ali_01" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="left" class="b14" style="padding-left: 14px; color: #ff7300; width: 50%">
                                    <p>
                                        <strong>
                                            <%# DataBinder.Eval(Container.DataItem, "LeftMenuName") %>
                                        </strong>
                                    </p>
                                </td>
                                <td width="50%" align="right" class="b14" style="padding-right: 14px;">
                                </td>
                            </tr>
                        </table>
                        <br />
                        <table width="600" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td align="left" class="lh15" style="word-break: break-all;">
                                    <%# DataBinder.Eval(Container.DataItem, "Body")%>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:Repeater>
            </td>
        </tr>
    </table>
    <br />
</center>
<script type="text/javascript">
function firstSelected()
{
    var activeMenu = "background-repeat:no-repeat;line-height:24px;font-weight:bold; width:140px;height:24px;background-image: url("+'<%= Globals.ApplicationPath %>'+"/Themes/Default/images/menu_bg_active.gif);text-align:center;font-size:14px;color:#333333;";
    var menu = "background-repeat:no-repeat;line-height:24px;font-weight:bold; width:140px;height:24px;background-image: url("+'<%= Globals.ApplicationPath %>'+"/Themes/Default/images/menu_bg.gif);text-align:center;font-size:14px;color:#333333;";
    var cArray=document.getElementById("tree1").getElementsByTagName("div"); 
    for(i=0;i<cArray.length;i++)
    {
        if('<%= entityId.ToString() %>' == cArray[i].getElementsByTagName("a")[0].title)
        {
            cArray[i].style.cssText = activeMenu;
        }
        else
        {
            cArray[i].style.cssText = menu;
        }
    }
    if(cArray.length>0 && '<%= entityId %>' == 0)
    {
        cArray[0].style.cssText = activeMenu;
    }
}
firstSelected();
</script>
